﻿@model IEnumerable<HRM.DAL.DAO.Attendance>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p  id="index-addlink">
    @Html.ActionLink("Create New", "Create")
</p>
<table class="view">
    <tr>
        <th>
            Employee
        </th>
        <th>
            Date
        </th>
        <th>
            InTime
        </th>
        <th>
            OutTime
        </th>
        <th>
            Comments
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Employee.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Date)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.InTime)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.OutTime)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Comments)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.AttendanceID }) |
            @Html.ActionLink("Details", "Details", new { id=item.AttendanceID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.AttendanceID })
        </td>
    </tr>
}

</table>
